package com.zxy.controller;

import com.zxy.model.Ordering;
import com.zxy.model.OrderingOk;
import com.zxy.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;
    @PostMapping("/ordering")
    public OrderingOk ordering(@RequestBody Ordering ordering){
        return orderService.order(ordering);
    }
}
